#ifndef __H_GAME_H__
#define __H_GAME_H__

#include <deque>
#include <vector>
#include <map>
#include "ICC_Timer_Handler.h"
#include "RedisClient.h"
#include "GameBase.h"
#include "DbPart.h"
#include "CClient.h"
#include "def.h"
#include "LogicData.h"


class CHost;
class CGameServer : BYTimerOject
{
public:
	CGameServer();
	virtual ~CGameServer();
public:
	// callback && interface
	virtual bool InitGame();
	virtual int OnBYTimeOut(int Timerid);
	int ProcessPacket(SocketHandler * pHandler, NETInputPacket* inputPkg);

	int ProP2P(SocketHandler * pHandler, NETInputPacket* inputPkg);
	int ProBroadcast(SocketHandler * pHandler, NETInputPacket* inputPkg);
	int ProPushCmd(SocketHandler * pHandler, NETInputPacket* inputPkg);
	int ProRegisterCmd(SocketHandler * pHandler, NETInputPacket* inputPkg);
	int ProCancelCmd(SocketHandler * pHandler, NETInputPacket* inputPkg);

public:
	CmdSubMap m_cmdSubMap;
	CHost* m_pHost;
};


#endif


